﻿namespace DomainServices.Tools.Validation
{
    using DomainServices.Tools;
    using System;
    using System.Web.Hosting;

    internal class DomainServiceValidator : MarshalByRefObject, IRegisteredObject, IDisposable
    {
        void IDisposable.Dispose()
        {
        }

        void IRegisteredObject.Stop(bool immediate)
        {
        }

        public void Validate(string[] assemblies, ILoggingService logger)
        {
            if (assemblies == null)
            {
                throw new ArgumentNullException("assemblies");
            }
            if (logger == null)
            {
                throw new ArgumentNullException("logger");
            }
            new DomainServiceCatalog(assemblies, logger);
        }
    }
}

